package com.zc;


class Animal {
    private String name;
    public int age;
    public String color;

    public Animal(String name, int age, String color) {
        this.name = name;
        this.age = age;
        this.color = color;
    }

    public String getName() {
        return name;
    }

    public void eat() {
        System.out.println(this.name + "正在吃饭……");
    }
}


class Cat extends Animal{
    public Cat(String name, int age, String color) {
        super(name, age, color);
    }

    public void miaomiao(){
        System.out.println(this.getName()+"正在喵喵喵……");
    }
}

class Dog extends Animal {
    public Dog(String name, int age, String color) {
        super(name, age, color);
    }
    public void bark(){
        System.out.println(this.getName()+"正在汪汪汪……");
    }
}


public class Main {
    public static void main(String[] args) {
        Dog dog1 = new Dog("哈士奇",2,"白色");

    }
}
